Optimal. Leaf size=236 \[ \frac {59 A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{4 a^{5/2} d}-\frac {167 A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a-a \sec (c+d x)}}\right )}{8 \sqrt {2} a^{5/2} d}+\frac {49 A \sin (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}+\frac {23 A \sin (c+d x) \cos (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}-\frac {15 A \sin (c+d x) \cos (c+d x)}{8 a d (a-a \sec (c+d x))^{3/2}}-\frac {A \sin (c+d x) \cos (c+d x)}{2 d (a-a \sec (c+d x))^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.73, antiderivative size = 236, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {4020, 4022, 3920, 3774, 203, 3795} \[ \frac {49 A \sin (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}+\frac {59 A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{4 a^{5/2} d}-\frac {167 A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a-a \sec (c+d x)}}\right )}{8 \sqrt {2} a^{5/2} d}+\frac {23 A \sin (c+d x) \cos (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}-\frac {15 A \sin (c+d x) \cos (c+d x)}{8 a d (a-a \sec (c+d x))^{3/2}}-\frac {A \sin (c+d x) \cos (c+d x)}{2 d (a-a \sec (c+d x))^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 3774
Rule 3795
Rule 3920
Rule 4020
Rule 4022
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) (A+A \sec (c+d x))}{(a-a \sec (c+d x))^{5/2}} \, dx &=-\frac {A \cos (c+d x) \sin (c+d x)}{2 d (a-a \sec (c+d x))^{5/2}}+\frac {\int \frac {\cos ^2(c+d x) (8 a A+7 a A \sec (c+d x))}{(a-a \sec (c+d x))^{3/2}} \, dx}{4 a^2}\\ &=-\frac {A \cos (c+d x) \sin (c+d x)}{2 d (a-a \sec (c+d x))^{5/2}}-\frac {15 A \cos (c+d x) \sin (c+d x)}{8 a d (a-a \sec (c+d x))^{3/2}}+\frac {\int \frac {\cos ^2(c+d x) \left (46 a^2 A+\frac {75}{2} a^2 A \sec (c+d x)\right )}{\sqrt {a-a \sec (c+d x)}} \, dx}{8 a^4}\\ &=-\frac {A \cos (c+d x) \sin (c+d x)}{2 d (a-a \sec (c+d x))^{5/2}}-\frac {15 A \cos (c+d x) \sin (c+d x)}{8 a d (a-a \sec (c+d x))^{3/2}}+\frac {23 A \cos (c+d x) \sin (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}-\frac {\int \frac {\cos (c+d x) \left (-98 a^3 A-69 a^3 A \sec (c+d x)\right )}{\sqrt {a-a \sec (c+d x)}} \, dx}{16 a^5}\\ &=-\frac {A \cos (c+d x) \sin (c+d x)}{2 d (a-a \sec (c+d x))^{5/2}}-\frac {15 A \cos (c+d x) \sin (c+d x)}{8 a d (a-a \sec (c+d x))^{3/2}}+\frac {49 A \sin (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}+\frac {23 A \cos (c+d x) \sin (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}+\frac {\int \frac {118 a^4 A+49 a^4 A \sec (c+d x)}{\sqrt {a-a \sec (c+d x)}} \, dx}{16 a^6}\\ &=-\frac {A \cos (c+d x) \sin (c+d x)}{2 d (a-a \sec (c+d x))^{5/2}}-\frac {15 A \cos (c+d x) \sin (c+d x)}{8 a d (a-a \sec (c+d x))^{3/2}}+\frac {49 A \sin (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}+\frac {23 A \cos (c+d x) \sin (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}+\frac {(59 A) \int \sqrt {a-a \sec (c+d x)} \, dx}{8 a^3}+\frac {(167 A) \int \frac {\sec (c+d x)}{\sqrt {a-a \sec (c+d x)}} \, dx}{16 a^2}\\ &=-\frac {A \cos (c+d x) \sin (c+d x)}{2 d (a-a \sec (c+d x))^{5/2}}-\frac {15 A \cos (c+d x) \sin (c+d x)}{8 a d (a-a \sec (c+d x))^{3/2}}+\frac {49 A \sin (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}+\frac {23 A \cos (c+d x) \sin (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}+\frac {(59 A) \operatorname {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,\frac {a \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{4 a^2 d}-\frac {(167 A) \operatorname {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,\frac {a \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{8 a^2 d}\\ &=\frac {59 A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{4 a^{5/2} d}-\frac {167 A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a-a \sec (c+d x)}}\right )}{8 \sqrt {2} a^{5/2} d}-\frac {A \cos (c+d x) \sin (c+d x)}{2 d (a-a \sec (c+d x))^{5/2}}-\frac {15 A \cos (c+d x) \sin (c+d x)}{8 a d (a-a \sec (c+d x))^{3/2}}+\frac {49 A \sin (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}+\frac {23 A \cos (c+d x) \sin (c+d x)}{8 a^2 d \sqrt {a-a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 6.82, size = 458, normalized size = 1.94 \[ A \left (\frac {\sin ^5\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec ^3(c+d x) \left (\frac {12 \sin \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )}{d}-\frac {14 \sin \left (\frac {3 c}{2}\right ) \sin \left (\frac {3 d x}{2}\right )}{d}-\frac {\sin \left (\frac {5 c}{2}\right ) \sin \left (\frac {5 d x}{2}\right )}{d}-\frac {12 \cos \left (\frac {c}{2}\right ) \cos \left (\frac {d x}{2}\right )}{d}+\frac {14 \cos \left (\frac {3 c}{2}\right ) \cos \left (\frac {3 d x}{2}\right )}{d}+\frac {\cos \left (\frac {5 c}{2}\right ) \cos \left (\frac {5 d x}{2}\right )}{d}-\frac {\cot \left (\frac {c}{2}\right ) \csc ^3\left (\frac {c}{2}+\frac {d x}{2}\right )}{d}+\frac {31 \cot \left (\frac {c}{2}\right ) \csc \left (\frac {c}{2}+\frac {d x}{2}\right )}{2 d}+\frac {\csc \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right ) \csc ^4\left (\frac {c}{2}+\frac {d x}{2}\right )}{d}-\frac {31 \csc \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right ) \csc ^2\left (\frac {c}{2}+\frac {d x}{2}\right )}{2 d}\right )}{(a-a \sec (c+d x))^{5/2}}+\frac {e^{-\frac {1}{2} i (c+d x)} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}} \sin ^5\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec ^{\frac {5}{2}}(c+d x) \left (59 \sinh ^{-1}\left (e^{i (c+d x)}\right )-\frac {167 \tanh ^{-1}\left (\frac {1+e^{i (c+d x)}}{\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}}\right )}{\sqrt {2}}+59 \tanh ^{-1}\left (\sqrt {1+e^{2 i (c+d x)}}\right )\right )}{\sqrt {2} d (a-a \sec (c+d x))^{5/2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 634, normalized size = 2.69 \[ \left [-\frac {167 \, \sqrt {2} {\left (A \cos \left (d x + c\right )^{2} - 2 \, A \cos \left (d x + c\right ) + A\right )} \sqrt {-a} \log \left (\frac {2 \, \sqrt {2} {\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} + {\left (3 \, a \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right )}{{\left (\cos \left (d x + c\right ) - 1\right )} \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) + 236 \, {\left (A \cos \left (d x + c\right )^{2} - 2 \, A \cos \left (d x + c\right ) + A\right )} \sqrt {-a} \log \left (\frac {2 \, {\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} - {\left (2 \, a \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right )}{\sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) + 4 \, {\left (4 \, A \cos \left (d x + c\right )^{5} + 22 \, A \cos \left (d x + c\right )^{4} - 57 \, A \cos \left (d x + c\right )^{3} - 26 \, A \cos \left (d x + c\right )^{2} + 49 \, A \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}}}{32 \, {\left (a^{3} d \cos \left (d x + c\right )^{2} - 2 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )} \sin \left (d x + c\right )}, \frac {167 \, \sqrt {2} {\left (A \cos \left (d x + c\right )^{2} - 2 \, A \cos \left (d x + c\right ) + A\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) - 236 \, {\left (A \cos \left (d x + c\right )^{2} - 2 \, A \cos \left (d x + c\right ) + A\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) - 2 \, {\left (4 \, A \cos \left (d x + c\right )^{5} + 22 \, A \cos \left (d x + c\right )^{4} - 57 \, A \cos \left (d x + c\right )^{3} - 26 \, A \cos \left (d x + c\right )^{2} + 49 \, A \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}}}{16 \, {\left (a^{3} d \cos \left (d x + c\right )^{2} - 2 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )} \sin \left (d x + c\right )}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.92, size = 308, normalized size = 1.31 \[ -\frac {\frac {167 \, \sqrt {2} A \arctan \left (\frac {\sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a}}{\sqrt {a}}\right )}{a^{\frac {5}{2}} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} - \frac {236 \, A \arctan \left (\frac {\sqrt {2} \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a}}{2 \, \sqrt {a}}\right )}{a^{\frac {5}{2}} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} - \frac {\sqrt {2} {\left (69 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{\frac {7}{2}} A + 315 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{\frac {5}{2}} A a + 444 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{\frac {3}{2}} A a^{2} + 196 \, \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a} A a^{3}\right )}}{{\left ({\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{2} + 3 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )} a + 2 \, a^{2}\right )}^{2} a^{2} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{16 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.89, size = 1475, normalized size = 6.25 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (A \sec \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{2}}{{\left (-a \sec \left (d x + c\right ) + a\right )}^{\frac {5}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\cos \left (c+d\,x\right )}^2\,\left (A+\frac {A}{\cos \left (c+d\,x\right )}\right )}{{\left (a-\frac {a}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ A \left (\int \frac {\cos ^{2}{\left (c + d x \right )}}{a^{2} \sqrt {- a \sec {\left (c + d x \right )} + a} \sec ^{2}{\left (c + d x \right )} - 2 a^{2} \sqrt {- a \sec {\left (c + d x \right )} + a} \sec {\left (c + d x \right )} + a^{2} \sqrt {- a \sec {\left (c + d x \right )} + a}}\, dx + \int \frac {\cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{a^{2} \sqrt {- a \sec {\left (c + d x \right )} + a} \sec ^{2}{\left (c + d x \right )} - 2 a^{2} \sqrt {- a \sec {\left (c + d x \right )} + a} \sec {\left (c + d x \right )} + a^{2} \sqrt {- a \sec {\left (c + d x \right )} + a}}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________